#ifndef _INHERITABLE_HANDLE_HPP
#define _INHERITABLE_HANDLE_HPP

#include <windows.h>

namespace judge {

class inheritable_handle {
public:
	inheritable_handle(HANDLE handle);
	~inheritable_handle();
	HANDLE handle();

private:
	HANDLE _create_handle(HANDLE handle);

private:
	// non-copyable
	inheritable_handle(const inheritable_handle &);
	inheritable_handle &operator =(const inheritable_handle &);

private:
	HANDLE handle_;
};

}

#endif
